from ferris import BasicModel
from google.appengine.ext import ndb
from app.models import util


class PublicationFrequency(BasicModel):
    """
    Models the different frequencies publications are published. For instance,
    weekly, monthly, etc.
    """
    name = ndb.StringProperty(required=True)
    name_sort = ndb.ComputedProperty(lambda self:
                                     util.homogenize_name(self.name))

